#include "Element.h"

void CClassInfo::GenerateVirtualFunctionTable()
{
    if(bIsVirtualFunctionTableGenerated)
    {
        return;
    }

    bIsVirtualFunctionTableGenerated=true;

    if(BaseClass)
    {
        BaseClass->GenerateVirtualFunctionTable();
        VirtualFunctionTable=BaseClass->VirtualFunctionTable;
    }

    for(auto& Function:Functions)
    {
        if(Function->IsVirtual)
        {
            VirtualFunctionTable.push_back(Function);
        }
    }
}